<?php use_helper('I18N') ?>
<?php use_stylesheets_for_form($form) ?>
<?php use_javascripts_for_form($form) ?>

<div id="cliente" class="limpiar">
    <fieldset>
                <legend><?php echo __("Datos")?></legend>
                <div id="datos" class="limpiar">
                    <div class="datosIzq">
                        <div><span class="label"><?php echo __("Nombre: ")?></span>
                            <span>
                                <?php echo $form['nombre']->renderError() ?>
                                <?php echo $form['nombre']->render(array('size' => '15px')) ?>
                            </span>
                        </div>
                        <div><span class="label"><?php echo __('Primer Apellido') ?>: </span>
                            <span>
                                <?php echo $form['primer_apellido']->renderError() ?>
                                <?php echo $form['primer_apellido']->render(array('size' => '15px')) ?>
                            </span>
                        </div>
                        <div><span class="label"><?php echo __('Segundo Apellido') ?>: </span>
                            <span>
                                <?php echo $form['segundo_apellido']->renderError() ?>
                                <?php echo $form['segundo_apellido']->render(array('size' => '15px')) ?>
                            </span>
                        </div>
                        <div><span class="label"><?php echo __('DNI') ?>: </span>
                            <span>
                                <?php echo $form['num_documento']->renderError() ?>
                                <?php echo $form['num_documento']->render(array('size' => '15px')) ?>
                            </span>
                        </div>
                    </div>
                    <div class="datosDrcha">
                        <div><span class="label"><?php echo __('Fecha Nacimiento') ?>: </span>
                            <span>
                                <?php echo $form['fecha_nac']->renderError() ?>
                                <?php echo $form['fecha_nac']->render(array()) ?>
                            </span>
                        </div>
                        <div><span class="label"><?php echo __('Sexo') ?>: </span>
                            <span>
                                <?php echo $form['sexo']->renderError() ?>
                                <?php echo $form['sexo']->render(array('size' => '15px')) ?>
                            </span>
                        </div>
                        <div><span class="label"><?php echo __('Idioma') ?>: </span>
                            <span>
                                <?php echo $form['idioma']->renderError() ?>
                                <?php echo $form['idioma']->render(array()) ?>
                            </span>
                        </div>
                        <div id="autorizaEnvio"><span class="label"><?php echo __('Autoriza envío') ?>: </span>
                            <span>
                                <?php echo $form['autoriza']->renderError() ?>
                                <?php echo $form['autoriza']->render(array()) ?>
                            </span>
                        </div>
                    </div>
                </div>
                <div id="otrosDatos" class="limpiar">
                    <div class="datosIzq">
                        <div><span class="label"><?php echo __('Domicilio: ')?></span>
                             <div>
                                 <div>
                                    <span>
                                        <?php echo __('Tipo Via') ?>:
                                        <?php echo $form['tipo_via']->renderError() ?>
                                        <?php echo $form['tipo_via']->render(array('size' => '10px')) ?>
                                    </span>
                                    <br/>
                                    <span>
                                        <?php echo __('Dirección') ?>:
                                        <?php echo $form['direccion']->renderError() ?>
                                        <?php echo $form['direccion']->render(array('size' => '32px')) ?>
                                    </span>
                                    <br/>
                                    <span>
                                        <?php echo __('Numero') ?>:
                                        <?php echo $form['num_via']->renderError() ?>
                                        <?php echo $form['num_via']->render(array('size' => '2px')) ?>
                                    </span>
                                </div>
                                <div> 
                                    <span>
                                        <?php echo __('Otros') ?>:
                                        <?php echo $form['resto_via']->renderError() ?>
                                        <?php echo $form['resto_via']->render(array('size' => '45px')) ?>
                                    </span>
                                </div>
                                <div>
                                    <span>
                                        <?php echo __('Piso') ?>:
                                        <?php echo $form['piso']->renderError() ?>
                                        <?php echo $form['piso']->render(array('size' => '4px')) ?>
                                    </span>
                                    <span>
                                        <?php echo __('Puerta') ?>:
                                        <?php echo $form['puerta']->renderError() ?>
                                        <?php echo $form['puerta']->render(array('size' => '4px')) ?>
                                    </span>
                                    <br/>
                                    <span>
                                        <?php echo __('Escalera') ?>:
                                        <?php echo $form['escalera']->renderError() ?>
                                        <?php echo $form['escalera']->render(array('size' => '8px')) ?>
                                    </span>
                                    <span>
                                        <?php echo __('Portal') ?>:
                                        <?php echo $form['portal']->renderError() ?>
                                        <?php echo $form['portal']->render(array('size' => '4px')) ?>
                                    </span>
                                </div> 
                             </div>
                        </div>
                        <br/>
                        <div><span class="label">Municipio: </span>
                            <div>
                                <div>
                                    <span>
                                        <?php echo __('Ciudad') ?>:
                                        <?php echo $form['municipio']->renderError() ?>
                                        <?php echo $form['municipio']->render(array('size' => '15px')) ?>
                                    </span>
                                    <span>
                                        <?php echo __('Codigo Postal') ?>:
                                        <?php echo $form['cod_postal']->renderError() ?>
                                        <?php echo $form['cod_postal']->render(array('size' => '10px')) ?>
                                    </span>
                                </div>
                                <div>
                                    <span>
                                        <?php echo __('Provincia') ?>:
                                        <?php echo $form['provincia']->renderError() ?>
                                        <?php echo $form['provincia']->render(array('size' => '15px')) ?>
                                    </span>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="datosDrcha">
                        <div><span class="label"><?php echo __("Teléfonos: ")?></span>
                            <br/>
                            <span>
                                <?php echo $form['telefono']->renderError() ?>
                                <?php echo $form['telefono']->render(array('size' => '35px')) ?>
                                <?php echo $form['telefono2']->renderError() ?>
                                <?php echo $form['telefono2']->render(array('size' => '35px')) ?>
                            </span>
                        </div>
                        <div><span class="label"><?php echo __("Email: ")?></span>
                            <span>
                                <?php echo $form['email']->renderError() ?>
                                <?php echo $form['email']->render(array('size' => '35px')) ?>
                            </span>
                        </div>
                    </div>
               </div>
            </fieldset>
</div>

<script>
    $(function() {
        $( document ).tooltip({
            items: "ul.error_list + input",
            content: function() {
                var element = $( this );
                var ul_error = element.prev();
                var li_error = ul_error.children();
                var mensaje_error = li_error.text();
                return mensaje_error;
                
            }
        });
    });
</script>